#ifndef GLNODE_H
#define GLNODE_H

#include <QObject>
#include "QRect"
#include "GL/gl.h"

class GLNode : public QObject {

    Q_OBJECT

public:
    explicit GLNode(QObject *parent = 0);
    ~GLNode();
    virtual void paintGL();

    void addChild(GLNode * child);
    GLNode * removeChild(int childTag);

    void setTag(int tag);
    int getTag() const;
    QRect getBoundingBox() const;
    void setTranslation(int translateX, int translateY);

signals:
    
public slots:

protected:
    virtual void compileDL();

    QList<GLNode *> childNodes;
    QMutableListIterator<GLNode *> * i;
    GLuint displayList;
    QRect nodeBoundingBox;
    QPoint nodeTranslation;
    int nodeTag;
};

#endif // GLNODE_H
